import { create } from 'zustand';
import { persist } from 'zustand/middleware';
const GlobalStore = create(
    persist(
        (set) => ({
            bg: 'light',
            setBg: () => {
                set((state) => ({ bg: state.bg === 'light' ? 'dark' : 'light' }));
            },
        }),
        { name: 'bg-color-store' }
    )
);

export default GlobalStore;